import java.util.Scanner;
import java.util.Stack;


public class ONP {
	public static final int MAX_EXPRESSION_LENGTH = 400;
	public static void main (String args[]) {
		Scanner in = new Scanner(System.in);
		
		// Enter the number of testcases
		int testcase = in.nextInt();
		while (testcase != 0) {
			String expression = in.next();
			char[] expressionArr = expression.toCharArray();
			testcase--;
			reversePolishExpression(expressionArr);
		}
	}
	
	private static void reversePolishExpression(char[] expressionArr) {
		Stack<Character> exprStack = new Stack<Character>();
		for (int  i =0; i < expressionArr.length; i++) {
			
		}
	}
}
